package com.fang.networkdisk.util;

import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

/**
 * @Description
 * @Author Bernie_fang
 * @Date 2025/3/1 22:08
 **/
public class PasswordUtil {

    /**
     * Description: 加密方法，算法与security保持一致
     * @Author: Bernie_fang
     * @Since: 2025/3/1 22:13
     * @param password:
     * @return: java.lang.String
     **/
    public static String encryption(String password) {
        BCryptPasswordEncoder bCryptPasswordEncoder = new BCryptPasswordEncoder();
        return bCryptPasswordEncoder.encode(password);
    }

}
